@namespace SwashbucklerDiary.Rcl.Components
@inherits DialogComponentBase

<SelectChipDialog Visible="Visible"
                  VisibleChanged="VisibleChanged"
                  TValue="string"
                  Value="Value"
                  ValueChanged="ValueChanged"
                  Title="@(I18n.T("Select mood"))"
                  ShowText="ShowText"
                  ShowTextChanged="ShowTextChanged"
                  Items="GlobalConfiguration.MoodIcons"
                  ItemValue="it=>it.Key"
                  ItemText="@(item=>I18n.T(item.Key))"
                  ItemIcon="it=>it.Value">
</SelectChipDialog>

@code {
    [Inject]
    private IGlobalConfiguration GlobalConfiguration { get; set; } = default!;

    [Parameter]
    public string? Value { get; set; }

    [Parameter]
    public EventCallback<string> ValueChanged { get; set; }

    [Parameter]
    public bool ShowText { get; set; }

    [Parameter]
    public EventCallback<bool> ShowTextChanged { get; set; }
}
